= stylesheet_link_tag 'js_cook_menu/theme'
%script{:type => "text/javascript"}
  var cmThemeOfficeBase = "#{url_prefix}/images/js_cook_menu/ThemeOffice/";
= javascript_include_tag 'js_cook_menu/JSCookMenu', 'js_cook_menu/theme'

- sezioni = %w(anagrafiche personale contabilita resoconti documenti wiki admin)

%div#GecoopMenu
  %ul
    - if FileTest.file?("#{RAILS_ROOT}/app/views/layouts/menu/_#{current_user.custom_menu}.html.haml")
      = render :partial => "layouts/menu/#{current_user.custom_menu}"
      %li
    - else
      - sezioni.each do |i|
        - if current_user.has_role?(i) and FileTest.file?("#{RAILS_ROOT}/app/views/layouts/menu/_#{i}.html.haml")
          = render :partial => "layouts/menu/#{i}"
          %li
    %li
      = render :partial => "layouts/menu/info"

%script{:type => "text/javascript"}
  cmDrawFromText ('GecoopMenu', 'hbr', cmThemeOffice, 'ThemeOffice');
